package cn.calm.bundle.entity;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import org.apache.struts2.json.annotations.JSON;

import cn.calm.commons.entity.BaseEntity;

@Entity
public class Bundle implements BaseEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private BundleKey id;

	private byte[] content;
	
	@Column(name = "BUNDLE_FILENAME")
	private String bundleFileName;
	
	@JSON(serialize = false)
	public byte[] getContent() {
		return content;
	}

	public void setContent(byte[] content) {
		this.content = content;
	}
	
	@Override
	public Object getValue() {
		return id;
	}

	@Override
	public String getDisplayName() {
		return "Bundle";
	}

	public BundleKey getId() {
		return id;
	}

	public void setId(BundleKey id) {
		this.id = id;
	}

	public String getBundleFileName() {
		return bundleFileName;
	}

	public void setBundleFileName(String bundleFileName) {
		this.bundleFileName = bundleFileName;
	}

}
